import {createStore, applyMiddleware,compose} from "redux";
// 操作工具
import reducer from "./reducer";
// import saga from './sagas'
import thunk from 'redux-thunk'
// import createSagaMiddleware from 'redux-saga'
// const sagaMiddleware = createSagaMiddleware()
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
        window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
            // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
        }) : compose;
const enhancer = composeEnhancers(
    applyMiddleware(thunk),
);
const store = createStore(
    reducer,
    enhancer
)
// sagaMiddleware.run(saga)
export default store;
